<?php
include "../soar/soar.inc";

function main($soar)
{/*{{{*/
    $confirm=$soar->confirm();

    $arr=$confirm->generate();
    if($arr == null)
    {
        return;
    }

    // arr['token']存入cookie
    setcookie("confirm_token", $arr['token'], 0, "/");

    // 显示图片
    header("Content-Type:image/png");
    echo base64_decode($arr['img']);
}/*}}}*/

$soar=new soar();
main($soar);
$soar->close();
?>
